package com.gao;

import com.gao.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author GaoXi
 * @date 2021/8/15 11:05
 */
@Controller
public class TestController {

/*    @GetMapping("/")
    public String index(){
        return "index";
    }*/


    @ResponseBody
    @RequestMapping("test")
    public String test() {
        return "my Test";
    }

    @ResponseBody
    @RequestMapping("testJson")
    public User testJson(){
        User user = new User();
        user.setName("高溪");
        user.setPassword("123456");
        return user;
    }




}
